﻿
namespace ShareMarking.Entity
{
    using System;


    /// <summary>
    /// 表名：qr_MoreActivity 主键列：id
    /// </summary>
    [SerializableAttribute()]
    public partial class qr_MoreActivity : MySoft.Data.Entity
    {

        protected Int32 _id;

        protected Int32? _ActivityID;

        protected Int32? _MA_Sort;

        protected String _MA_wxTitle;

        protected String _MA_wxImgUrl;

        protected String _MA_wxDesc;

        protected String _MA_wxUrl;

        protected String _MA_wxbeforeUrl;

        protected String _MA_wxafterUrl;

        protected String _MA_currentUrl;

        protected DateTime? _CreateOn;

        protected DateTime? _DateModified;

        public Int32 id
        {
            get
            {
                return this._id;
            }
            set
            {
                this.OnPropertyValueChange(_.id, _id, value);
                this._id = value;
            }
        }

        /// <summary>
        /// 关联活动ID
        /// </summary>
        public Int32? ActivityID
        {
            get
            {
                return this._ActivityID;
            }
            set
            {
                this.OnPropertyValueChange(_.ActivityID, _ActivityID, value);
                this._ActivityID = value;
            }
        }

        /// <summary>
        /// 图文标识（从2开始，5结束，2代表创建多图文活动第二条数据，以此类推）
        /// </summary>
        public Int32? MA_Sort
        {
            get
            {
                return this._MA_Sort;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_Sort, _MA_Sort, value);
                this._MA_Sort = value;
            }
        }

        /// <summary>
        /// 微信图文标题
        /// </summary>
        public String MA_wxTitle
        {
            get
            {
                return this._MA_wxTitle;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_wxTitle, _MA_wxTitle, value);
                this._MA_wxTitle = value;
            }
        }

        /// <summary>
        /// 微信图文图片
        /// </summary>
        public String MA_wxImgUrl
        {
            get
            {
                return this._MA_wxImgUrl;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_wxImgUrl, _MA_wxImgUrl, value);
                this._MA_wxImgUrl = value;
            }
        }

        /// <summary>
        /// 微信图文描述
        /// </summary>
        public String MA_wxDesc
        {
            get
            {
                return this._MA_wxDesc;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_wxDesc, _MA_wxDesc, value);
                this._MA_wxDesc = value;
            }
        }

        /// <summary>
        /// 活动中链接url
        /// </summary>
        public String MA_wxUrl
        {
            get
            {
                return this._MA_wxUrl;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_wxUrl, _MA_wxUrl, value);
                this._MA_wxUrl = value;
            }
        }

        /// <summary>
        /// 活动前链接url
        /// </summary>
        public String MA_wxbeforeUrl
        {
            get
            {
                return this._MA_wxbeforeUrl;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_wxbeforeUrl, _MA_wxbeforeUrl, value);
                this._MA_wxbeforeUrl = value;
            }
        }

        /// <summary>
        /// 活动后链接url
        /// </summary>
        public String MA_wxafterUrl
        {
            get
            {
                return this._MA_wxafterUrl;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_wxafterUrl, _MA_wxafterUrl, value);
                this._MA_wxafterUrl = value;
            }
        }

        /// <summary>
        /// 当前url
        /// </summary>
        public String MA_currentUrl
        {
            get
            {
                return this._MA_currentUrl;
            }
            set
            {
                this.OnPropertyValueChange(_.MA_currentUrl, _MA_currentUrl, value);
                this._MA_currentUrl = value;
            }
        }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateOn
        {
            get
            {
                return this._CreateOn;
            }
            set
            {
                this.OnPropertyValueChange(_.CreateOn, _CreateOn, value);
                this._CreateOn = value;
            }
        }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? DateModified
        {
            get
            {
                return this._DateModified;
            }
            set
            {
                this.OnPropertyValueChange(_.DateModified, _DateModified, value);
                this._DateModified = value;
            }
        }

        /// <summary>
        /// 获取实体对应的表名
        /// </summary>
        protected override MySoft.Data.Table GetTable()
        {
            return new MySoft.Data.Table<qr_MoreActivity>("qr_MoreActivity");
        }

        /// <summary>
        /// 获取实体中的标识列
        /// </summary>
        protected override MySoft.Data.Field GetIdentityField()
        {
            return _.id;
        }

        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        protected override MySoft.Data.Field[] GetPrimaryKeyFields()
        {
            return new MySoft.Data.Field[] {
    					_.id};
        }

        /// <summary>
        /// 获取列信息
        /// </summary>
        protected override MySoft.Data.Field[] GetFields()
        {
            return new MySoft.Data.Field[] {
    					_.id,
    					_.ActivityID,
    					_.MA_Sort,
    					_.MA_wxTitle,
    					_.MA_wxImgUrl,
    					_.MA_wxDesc,
    					_.MA_wxUrl,
    					_.MA_wxbeforeUrl,
    					_.MA_wxafterUrl,
    					_.MA_currentUrl,
    					_.CreateOn,
    					_.DateModified};
        }

        /// <summary>
        /// 获取列数据
        /// </summary>
        protected override object[] GetValues()
        {
            return new object[] {
    					this._id,
    					this._ActivityID,
    					this._MA_Sort,
    					this._MA_wxTitle,
    					this._MA_wxImgUrl,
    					this._MA_wxDesc,
    					this._MA_wxUrl,
    					this._MA_wxbeforeUrl,
    					this._MA_wxafterUrl,
    					this._MA_currentUrl,
    					this._CreateOn,
    					this._DateModified};
        }

        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        protected override void SetValues(MySoft.Data.IRowReader reader)
        {
            if ((false == reader.IsDBNull(_.id)))
            {
                this._id = reader.GetInt32(_.id);
            }
            if ((false == reader.IsDBNull(_.ActivityID)))
            {
                this._ActivityID = reader.GetInt32(_.ActivityID);
            }
            if ((false == reader.IsDBNull(_.MA_Sort)))
            {
                this._MA_Sort = reader.GetInt32(_.MA_Sort);
            }
            if ((false == reader.IsDBNull(_.MA_wxTitle)))
            {
                this._MA_wxTitle = reader.GetString(_.MA_wxTitle);
            }
            if ((false == reader.IsDBNull(_.MA_wxImgUrl)))
            {
                this._MA_wxImgUrl = reader.GetString(_.MA_wxImgUrl);
            }
            if ((false == reader.IsDBNull(_.MA_wxDesc)))
            {
                this._MA_wxDesc = reader.GetString(_.MA_wxDesc);
            }
            if ((false == reader.IsDBNull(_.MA_wxUrl)))
            {
                this._MA_wxUrl = reader.GetString(_.MA_wxUrl);
            }
            if ((false == reader.IsDBNull(_.MA_wxbeforeUrl)))
            {
                this._MA_wxbeforeUrl = reader.GetString(_.MA_wxbeforeUrl);
            }
            if ((false == reader.IsDBNull(_.MA_wxafterUrl)))
            {
                this._MA_wxafterUrl = reader.GetString(_.MA_wxafterUrl);
            }
            if ((false == reader.IsDBNull(_.MA_currentUrl)))
            {
                this._MA_currentUrl = reader.GetString(_.MA_currentUrl);
            }
            if ((false == reader.IsDBNull(_.CreateOn)))
            {
                this._CreateOn = reader.GetDateTime(_.CreateOn);
            }
            if ((false == reader.IsDBNull(_.DateModified)))
            {
                this._DateModified = reader.GetDateTime(_.DateModified);
            }
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if ((obj == null))
            {
                return false;
            }
            if ((false == typeof(qr_MoreActivity).IsAssignableFrom(obj.GetType())))
            {
                return false;
            }
            if ((((object)(this)) == ((object)(obj))))
            {
                return true;
            }
            return false;
        }

        public class _
        {

            /// <summary>
            /// 表示选择所有列，与*等同
            /// </summary>
            public static MySoft.Data.AllField All = new MySoft.Data.AllField<qr_MoreActivity>();

            /// <summary>
            /// 字段名：id - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field id = new MySoft.Data.Field<qr_MoreActivity>("id");

            /// <summary>
            /// 关联活动ID - 字段名：ActivityID - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field ActivityID = new MySoft.Data.Field<qr_MoreActivity>("ActivityID");

            /// <summary>
            /// 图文标识（从2开始，5结束，2代表创建多图文活动第二条数据，以此类推） - 字段名：MA_Sort - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field MA_Sort = new MySoft.Data.Field<qr_MoreActivity>("MA_Sort");

            /// <summary>
            /// 微信图文标题 - 字段名：MA_wxTitle - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field MA_wxTitle = new MySoft.Data.Field<qr_MoreActivity>("MA_wxTitle");

            /// <summary>
            /// 微信图文图片 - 字段名：MA_wxImgUrl - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field MA_wxImgUrl = new MySoft.Data.Field<qr_MoreActivity>("MA_wxImgUrl");

            /// <summary>
            /// 微信图文描述 - 字段名：MA_wxDesc - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field MA_wxDesc = new MySoft.Data.Field<qr_MoreActivity>("MA_wxDesc");

            /// <summary>
            /// 活动中链接url - 字段名：MA_wxUrl - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field MA_wxUrl = new MySoft.Data.Field<qr_MoreActivity>("MA_wxUrl");

            /// <summary>
            /// 活动前链接url - 字段名：MA_wxbeforeUrl - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field MA_wxbeforeUrl = new MySoft.Data.Field<qr_MoreActivity>("MA_wxbeforeUrl");

            /// <summary>
            /// 活动后链接url - 字段名：MA_wxafterUrl - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field MA_wxafterUrl = new MySoft.Data.Field<qr_MoreActivity>("MA_wxafterUrl");

            /// <summary>
            /// 当前url - 字段名：MA_currentUrl - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field MA_currentUrl = new MySoft.Data.Field<qr_MoreActivity>("MA_currentUrl");

            /// <summary>
            /// 创建时间 - 字段名：CreateOn - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field CreateOn = new MySoft.Data.Field<qr_MoreActivity>("CreateOn");

            /// <summary>
            /// 更新时间 - 字段名：DateModified - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field DateModified = new MySoft.Data.Field<qr_MoreActivity>("DateModified");
        }
    }
}

